//wysiwyg-Editor
$(function()
		{
		    //$('#content').wysiwyg();
	$('#content-textarea').wysiwyg({
	    controls : {
	        separator04 : { visible : true },

	        insertOrderedList : { visible : true },
	        insertUnorderedList : { visible : true }
	    }
	});

});
//Module


function moduleClick() 
{
	var configureDiv = document.createElement("div");
	configureDiv.setAttribute("id", "configureIframe");
	configureDiv.setAttribute("style", 	"position:absolute;" +
								 	"width:100%;" +
								 	"height:100%;" +
								 	"background-color:#ccc;" +
								 	"top:0;" +
								 	"left:0;");
	var new_iFrame = document.createElement("iframe");
	new_iFrame.setAttribute("src", "/admin/module/configure/?siteId="+siteId+"&moduleId="+moduleId);

	configureDiv.appendChild(new_iFrame);
	var anchor = document.createElement("a");
	anchor.setAttribute("href", "#");
	anchor.setAttribute("onclick", "removeIframe(\"#configureIframe\");return false;");
	anchor.innerHTML = "Fenster Schlie&szlig;en";
	configureDiv.appendChild(anchor);
	$("body").append(configureDiv);
}
function removeIframe(iFrame)
{
	$(iFrame).remove();
}
$(document).ready(function()
{
	var oIframe = document.getElementById("content-textareaIFrame");
	var oDoc = oIframe.contentWindow || oIframe.contentDocument;
	if (oDoc.document) {
	    oDoc = oDoc.document;
	}
	var test = document.createElement("img");
	test.alt = "modul test";
	$(oDoc+">img.modul").click(moduleClick);
});